HPOM provides a set of Java classes on the HP Operations agent to
create and send a message to the HPOM management server
acknowledge a previously sent message
send a monitor value to the HPOM monitor agent
NOTE:
The HP Operations agent API includes support for C/C++ and Java, as
well as for every language that supports DCOM automation (for
example, VB, VBScript, JScript, and so on). However, the agent
message stream interface supports C APIs only. All of the APIs are
built using Microsoft Visual Studio 2005.
JAR files
The JAR files jopcagtbase.jar and
jopcagtmsg.jar that are necessary to use the APIs are
installed together with the agent on the managed node.
Examples
Examples of how the API classes can be used from Java are
available in the directory
where <java source code file> could be JOpcAgtMsgTest.java or
JOpcMonValueTest.java;
<java class> would then be JOpcAgtMsgTest or JOpcMonValueTest
On UNIX
To build the managed node sample program you have to copy the
source files to the managed node. The HP Operations agent software
must be installed on the managed node - otherwise the HPOM JAR
files will not be present. Copy the sample programs to any location
(for example, /tmp). To use the Java HPOM API wrapper classes:
the -classpath parameter used for the javac and java commands
must include the jopcagtbase.jar and jopcagtmsg.jar files
the PATH system variable must include the directory where the
shared library files reside. The agent installation does this
automatically.
See "/opt/OV/www/htdocs/jdoc_agent/index.html" for a javadoc style
class documentation.
To compile and run the example code:
copy the source code to the managed node into a temporary
directory and cd to the directory
compile the example code with javac -classpath
"/opt/jar/jopcagtbase.jar:/opt/jar/jopcagtmsg.jar" <java source
code file>
run the example code with java -classpath
".:/opt/jar/jopcagtbase.jar:/opt/jar/jopcagtmsg.jar" <java
class>
where <java source code file> could be JOpcAgtMsgTest.java or
JOpcMonValueTest.java;
<java class> would then be JOpcAgtMsgTest or JOpcMonValueTest